#include <X11/Xlib.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
    Display *dpy = XOpenDisplay(getenv("DISPLAY"));
    XKeyboardControl kbctl;
    kbctl.key = 95; //F11
    kbctl.auto_repeat_mode = AutoRepeatModeOff;
    XChangeKeyboardControl(dpy, KBKey|KBAutoRepeatMode, &kbctl);
    XCloseDisplay(dpy);
    return 0;
}
